/*
 * Copyright 2002-2007 the original author or authors.
 *
 * Licensed under the Apache license, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *      http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
package org.internna.iwebjtracker.services;

import java.util.List;
import java.util.Map;

/**
 * Generates basic reports and statistics about several key abstractions like Activity or Project.
 *
 * @author Jose Noheda
 * @since 1.0
 */
public interface ActivityReporter {

    String TOTAL_USERS = "total_users";
    String TOTAL_OPEN_ISSUES = "total_open";
    String TOTAL_ACTIVITY = "total_activity";
    String TOTAL_PROJECTS = "total_projects";
    String TOTAL_ASSIGNED = "total_assigned";
    String TOTAL_DEVELOPERS = "total_developers";
    String TOTAL_DISABLED_USERS = "total_disabled_users";
    String TOTAL_CRITICAL_OPEN_ISSUES = "total_critical_open";

    /**
     * Data for an activity chart that groups the results by type.
     *
     * @return a non null collection
     */
    List<Object[]> getRecentActivityByType();

    /**
     * Data for an activity chart that groups the results by priority.
     *
     * @return a non null collection
     */
    List<Object[]> getRecentActivityByPriority();

    /**
     * Gets totals relative to users of the application like number of disabled users and so on.
     *
     * @return a non null map
     */
    Map<String, Object> getUsersStatistics();

    /**
     * Gets totals relative to projects in the application like the total number or number of developers.
     *
     * @return a non null map
     */
    Map<String, Object> getProjectsStatistics();

    /**
     * Project and activity information about the current user
     *
     * @return a non null map
     */
    Map<String, Object> getProjectsStatisticsForCurrentUser();

    /**
     * Open / closed information for all the projects the current user is tracking.
     *
     * @return any
     */
    Map<String, String> getOpenClosedIssuesForCurrentUserProjects();

}
